Ext.define('ProjectAON.view.evaluatiesBeheren.Scherm35', {
    extend:'Ext.panel.Panel',
    alias:'widget.scherm35',

    title:'Evaluaties Beheren',

    requires:[
        'ProjectAON.view.evaluatiesBeheren.List'
    ],

    stores:[
        'ControleScore'
    ],

    models:[
        'ControleScore'
    ],

    initComponent:function () {
        var me = this;
        Ext.applyIf(this, {
            layout:'border',
            items:[
                {
                    collapsible:false,
                    region:'north',
                    resizable:false,
                    xtype:'panel',
                    items:[
                        {
                            xtype:'button',
                            text:'Terug',
                            icon:'http://whatisextjs.com/BAHO/icons/page_back.png',
                            action:'back'
                        },
                        {
                            xtype:'button',
                            text:'Reset',
                            icon:'http://whatisextjs.com/BAHO/icons/delete.png',
                            action:'reset'
                        },
                        {
                            xtype:'textfield',
                            emptyText:'Zoekopdracht',
                            fieldLabel:'Zoek:',
                            cls:'zoekButton',
                            name:'searchField',
                            listeners:{
                                change:{
                                    fn:me.searchGrid,
                                    scope:this,
                                    buffer:100
                                }
                            }
                        }
                    ]
                },
                {
                    collapsible:false,
                    region:'center',
                    items:[
                        {
                            collapsible:false,
                            region:'center',
                            //width:Ext.getBody().getViewSize().width - 100,
                            height:Ext.getBody().getViewSize().height - 60,
                            layout:'fit',
                            items:[
                                {
                                    xtype:'scorelist'
                                }
                            ]
                            /*xtype:'grid',
                            id:'gridPanel',
                            titleCollapse:true,

                            columns:[
                                {header:'Naam', dataIndex:'naam', flex:1},
                                {header:'Klas', dataIndex:'klas', flex:1},
                                {header:'Score', dataIndex:'score', flex:1}
                            ],
                            store:'ControleScore'*/
                        }
                    ]
                }
            ]
        });
        this.callParent(arguments);
        Ext.ComponentQuery.query('searchgrid')[0].setTextfieldReference(this.down('textfield[name=searchField]'));
    },

    searchGrid:function () {
        Ext.ComponentQuery.query('searchgrid')[0].onTextFieldChange();
    }
});